.filter-node {
  display: inline-flex;
  align-items: center;
  background: $filter-node-background;
  border-radius: 3px;
  margin-bottom: 3px;
  position: relative;
  box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.5);
  border: 1px solid transparent;
  transition: all 50ms;

  p {
    font-family: $mono-font;
    color: $filter-node-foreground;
    font-size: 9px;
    line-height: 13px;
    padding: 0 4px;
    border-radius: 3px;
    margin: 0;
  }

  .remove-button {
    @include button-reset;
    display: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    position: absolute;
    right: -8px;
    top: -8px;
    padding: 0;
    justify-content: center;
    background-color: $gray-9;
    transform: scale(1);
    border: 1px solid white;

    &:hover {
      @include shadow-flat;
      transition: all 150ms;
      transform: scale(1.1);
    }

    &:active {
      background-color: $gray-5;
      transform: scale(1);
    }

    &:hover {
      svg {
        transform: scale(1.1);
      }
    }

    svg {
      width: 6px;
      height: 6px;
      stroke: white;
      fill: white;
    }
  }

  &:hover .remove-button {
    display: flex;
  }

  &.focused {
    border: 1px solid $yellow;
    background: $green-light;
  }
}
